package sec_pages;


import org.openqa.selenium.WebElement;
import utils.Log4Test;

public class WishListPage extends SecGeneralPage {

    public void createNewWishList() {

        elementIsLocated(getLocator("linkCreateNewList")).click();

        Log4Test.info("create new wish list");

    }

    public void enterWishItemAndSave(String wishItem) {

        elementIsLocated(getLocator("wishTextField")).clear();
        elementIsLocated(getLocator("wishTextField")).sendKeys(wishItem);

        elementIsLocated(getLocator("wishTextFieldSaveButton")).click();
    }

    public WebElement verifyWishLishCreated() {

        Log4Test.info("Verify that Sony Xperia Z2 D6502 Black wish appeared ");

        return elementIsLocated(getLocator("wishListTitle"));
    }


    public void returnHomePage() {

        elementIsLocated(getLocator("homePageLinkWL")).click();

        waitForPageLoaded(webDriver);

        waitForPageLoaded(webDriver);

        Log4Test.info("Return to Home Page");

    }


}
